﻿#region namespace

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

#endregion


namespace Janus.Cores.Configuration
{
    /// <summary>
    /// 数据库配置节
    /// </summary>
    public class DatabaseSection : ConfigurationElement
    {
        internal const string SECTION_NAME = "database";
        /// <summary>
        /// 默认数据库连接名称
        /// </summary>
        [ConfigurationProperty("default", IsRequired = false)]
        public string Default
        {
            get
            {
                return this["default"] as string;
            }
        }

        //static Lazy<DatabaseSettings> _current = new Lazy<DatabaseSettings>(() =>
        //{
        //    return ConfigurationManager.GetSection(SECTION_NAME) as DatabaseSettings;
        //});

        ///// <summary>
        ///// 
        ///// </summary>
        //public static DatabaseSettings Current
        //{
        //    get
        //    {
        //        return _current.Value;
        //    }
        //}
    }
}
